package com.zhl.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhl.mapper.FavoriteMapper;
import com.zhl.model.Favorite;

@Service
public class FavoriteService {
	
	@Autowired
	private FavoriteMapper favoriteMapper;

	
	public  void setFavoriteMapper(FavoriteMapper favoriteMapper) {
		this.favoriteMapper = favoriteMapper;
	}
	 
	public  void findAll(){


		List<Favorite> allUsers = favoriteMapper.findAll();
	
		for(int i = 0; i < allUsers.size(); i++){
			System.out.println(allUsers.get(i).getId()+"\t"+allUsers.get(i).getStation()+"\t"+allUsers.get(i).getStation_code());
		}

	}
	
	

	
}
